package com.demo.enums;


public enum ErpOrDw {
	Both(1,"ERP表和DW表共有的字段"),ERP(2,"ERP表独有的字段"),DW(4,"DW表独有的字段");
	private Integer code;
	private String msg;

	private ErpOrDw() {
	}

	private ErpOrDw(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public ErpOrDw stateOf(Integer code) {
		for (ErpOrDw erpOrDw : ErpOrDw.values()) {
			if (erpOrDw.getCode() == code) {
				return erpOrDw;
			}
		}
		return null;
	}
}
